import { axios } from '../../utils/request'

const api = {
    save: '/finance/accountingLedger/save',
    list: '/finance/accountingLedger/getList',
    delete: '/finance/accountingBalance/delete',
    fs: '/finance/accountingLedger/getPageList',//发生额及科目余额表

    searchList: '/finance/accountingLedger/getGeneralLedgerList',//总分类账查询列表
    searchClient: '/finance/accountingAuxiliaryLedger/pageCrmAccountingAuxiliaryLedger',//获取客户辅助科目余额
    searchPersonal: '/finance/accountingAuxiliaryLedger/pageUserAccountingAuxiliaryLedger',//获取个人辅助科目余额
    searchSupplier: '/finance/accountingAuxiliaryLedger/pageVendorAccountingAuxiliaryLedger',//获取供应商辅助科目余额

    searchDetails: '/finance/accountingAuxiliaryLedger/pageAccountingAuxiliaryDetailList',//获取辅助总账/明细账
    searchDetailsYu: '/finance/accountingAuxiliaryLedger/pageAccountingAuxiliaryLedgerList',//获取辅助科目余额明细
}
/**
 * 保存
 */
export function save (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 删除
 */
export function remove (data) {
    return axios({
        url: api.delete,
        method: "delete",
        params: data
    })
}

/**
 * 列表
 */
export function getList (data) {
    return axios({
        url: api.list,
        method: "get",
        params: data
    })
}

/**
 * 发生额及科目余额表
 */
export function fsList (data) {
    return axios({
        url: api.fs,
        method: "get",
        params: data
    })
}

/**
 * 总分类账查询列表
 */
export function ledgerList (data) {
    return axios({
        url: api.searchList,
        method: "get",
        params: data
    })
}
/**
 * 辅助客户查询列表
 */
export function searchClient (data) {
    return axios({
        url: api.searchClient,
        method: "get",
        params: data
    })
}
/**
 * 辅助供应商查询列表
 */
export function searchSupplier (data) {
    return axios({
        url: api.searchSupplier,
        method: "get",
        params: data
    })
}
/**
 * 辅助个人查询列表
 */
export function searchPersonal (data) {
    return axios({
        url: api.searchPersonal,
        method: "get",
        params: data
    })
}
/**
 * 辅助明细帐
 */
export function searchDetails (data) {
    return axios({
        url: api.searchDetails,
        method: "get",
        params: data
    })
}

//辅助余额明细
export function searchDetailsYu (data) {
    return axios({
        url: api.searchDetailsYu,
        method: "get",
        params: data
    })
}



//期初余额试算平衡
export function trialBalance (data) {
    return axios({
        url: '/finance/accountingLedger/trialBalance',
        method: "get",
        params: data
    })
}